/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nsip;

import nsip.components.InformationSystem;
import nsip.components.ds.StatisticDataBase;
import nsip.transport.NsipMessageSucker;
import nsip.transport.NsipTransport;

/**
 * Provides an interface for evaluating RFQs and processing accepted ones.
 * 
 * @author nico.rehwaldt
 */
public abstract class NsipAgent implements NsipMessageSucker {

    private final InformationSystem is;
    private final NsipTransport transport;
    private final StatisticDataBase statistics;
    
    protected NsipAgent(InformationSystem is, NsipTransport transport) {
        this.is = is;
        this.transport = transport;
        this.statistics = is.getStatistics();
    }

    /**
     * Return the information system
     * @return
     */
    protected InformationSystem is() {
        return is;
    }

    /**
     * Returns the statistics module 
     * @return
     */
    protected StatisticDataBase statistics() {
        return statistics;
    }

    /**
     * Return the transport to send messages to the outer world or to generate
     * ids.
     * 
     * @return
     */
    protected NsipTransport transport() {
        return transport;
    }
}
